The present invention relates to a method for programming a bus-compatible electronic motor vehicle controller that is equipped with at least one microcomputer to implement its control function and with ROM and RAM in order to accommodate and handle applications software required for the control function, and is also equipped with at least one bus protocol chip, the ROM being programmed such that the applications software communicates with a bus via the at least one bus protocol chip and via a specific instruction and communications interface forming a first interface of the at least one bus protocol chip.
The increased use of electrical and, in particular, electronically controlled actuators, motors and units in motor vehicles makes ever more extensive wiring necessary. The increasing number of contacts and cables results in a growing manufacturing cost, space problems within the bodywork and reliability which is falling overall, with increasing costs. Fault tracing becomes ever more time-consuming.
The CAN (Controller Area Network) concept was developed in order to create a remedy for this. This concept comprises a serial bus network having a special data transmission protocol into which all the corresponding components are linked and which allows quasi-real-time use with very high operational reliability.
In the context of this new concept, all the controllers and operating apparatuses which are intended to be operated in such a bus network are equipped with suitable hardware and software means so that they respond in accordance with the bus protocol, are activated without any mutual adverse effect and can pass data or control commands preferably using the broadcast method over the network. In practice, this is implemented per controller by means of a bus protocol chip, also referred to as a CAN controller or a CAN chip for short in the following text. The CAN controller is connected to the bus, operates this bus and communicates with the respective microcomputer or microcomputers that are suitably programmed for this purpose of the controller for the specific application.
The multiplicity of bus-relevant controllers in a vehicle and the consequent additional delivery from different manufacturers accordingly has the consequence that comparable accesses to, and communication functions of the respective controller-specific applications software on the bus must be carried out separately by each controller manufacturer. These depend on the CAN controller used and, in practice, are also carried out in a different manner in each case. This not only has the consequence of a considerable time expenditure, for the programming of the individual controllers. The access times, which differ and are scattered depending on the programming, from the application via the CAN controller to the bus can produce concealed problems. This can happen, for example, in the case of real-time operation of a large number of controllers from different manufacturers, even if all the apparatuses conform to the bus protocol respectively considered on their own.
An object of the invention is to create a method which allows simple, time-saving, reliable programming, minimizing the aforementioned problems, of very different motor vehicle controllers for bus operation.
This and other objects are achieved by the present invention which provides a method for programming a bus-compatible electronic motor vehicle controller that is equipped with at least one microcomputer to implement its control function and with ROM and RAM in order to accommodate and handle applications software required for the control function, and is also equipped with at least one bus protocol chip, the ROM being programmed such that the applications software communicates with a bus via the at least one bus protocol chip and via a specific instruction and communications interface forming a first interface of the at least one bus protocol chip. The method includes providing a second interface, which is independent of the at least one bus protocol chip, and defining the second interface as a further, universal instruction and communications interface. The first and second interfaces are coupled with a driver module that is independent of the applications software and adapted to the at least one bus protocol chip and has the properties of an adapter. The applications software are matched and aligned exclusively to the second interface with respect to the bus communication and the applications software is produced independently of the at least one bus protocol chip. The applications software and the driver module are linked to one another by a link process. Program code is obtained as a result of the link process. The program code is stored such that the program code is resident in the ROM.
The method according to the invention makes the bus protocol chip or chips (CAN controller) which is or are used in each case in a motor vehicle controller "invisible" for the programmer of the respective applications software. Since the bus protocol chip or chips are thus to a certain extent "concealed" from the applications software, the type of bus protocol chip or chips used in each case is no longer significant.
This concealment is carried out in that a universal interface, which is independent of the bus protocol chip or chips, is defined in the sense of an instruction and communications interface. A driver module, which is tailored to the relevant bus protocol chip or chips and has the properties of an adapter, is produced, independently of the applications software, for the purpose of coupling the interface to the instruction and communications interface or interfaces of the bus protocol chip or chips. The controller-specific applications software is matched and aligned, with respect to the bus communication, exclusively to the interface and, to that extent, is produced independently of the bus protocol chip or chips. The applications software, which is independent of the bus protocol chip or chips, and the application-independent driver module are linked to one another by a link process. The program code which is thus obtained is stored such that it is resident in the ROM of the at least one microcomputer of the controller.
The link storage of the CAN controller-specific driver module together with the respective applications software in each individual one of a multiplicity of controllers thus saves unnecessary software development time for identical or similar communications steps and operations.
By reduction of the operations to be carried out on the applications side to only a few, simple but powerful routines, which are to be carried out in the direction coming from the application to the bus or from the bus to the application, a very high operating reliability and real-time compatibility of many controllers in a CAN bus network can be achieved as well, while corresponding driver modules for different bus protocol chips or CAN controllers can in each case be developed, tested and made available centrally.
In certain embodiments of the invention, at least the network management functions are combined in a further module, and if this further module is additionally linked analogously to the driver module of the applications software, the programmer of the applications software can be freed of calling up, addressing and/or management algorithms which are required for interaction in the network of the relevant motor vehicle controller with others.
Other objects, advantages and novel features of the present invention will become apparent from the following detailed description of the invention when considered in conjunction with the accompanying drawings.